#!/bin/bash
mem=`ps aux|sed '1'd|awk '{print $6}'`
num=0
for n in $mem;do
   num=$((num+n))
done
echo $num